package cn.swust.designpatternlearningplatform.domain.dto;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class TopicOptionDto implements Cloneable{
    private Integer topicId;
    @JsonProperty("key")
    private String optionName;
    @JsonProperty("option_content")
    private String optionContent;
    @JsonProperty("option_graph")
    private String optionPath;

    @Override
    public TopicOptionDto clone() {
        try {
            // TODO: copy mutable state here, so the clone can't change the internals of the original
            return (TopicOptionDto) super.clone();
        } catch (CloneNotSupportedException e) {
            throw new AssertionError();
        }
    }
}
